home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / src / lib / camera / cameraP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-11  |  2.0 KB  |  63 lines

  1. /* Copyright (c) 1992 The Geometry Center; University of Minnesota
  2.    1300 South Second Street;  Minneapolis, MN  55454, USA;
  3.    
  4. This file is part of geomview/OOGL. geomview/OOGL is free software;
  5. you can redistribute it and/or modify it only under the terms given in
  6. the file COPYING, which you should have received along with this file.
  7. This and other related software may be obtained via anonymous ftp from
  8. geom.umn.edu; email: software@geom.umn.edu. */
  9.  
  10. /* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */
  11.  
  12. #ifndef CAMERAP_H
  13. #define CAMERAP_H
  14.  
  15. #include "camera.h"
  16.  
  17. #define    CAMMAGIC    0x9c816301
  18.  
  19. struct Camera {
  20.     REFERENCEFIELDS
  21.     Handle    *c2whandle;    /* Handle for external camtoworld's */
  22.     Transform    camtoworld;    /* this moves the camera to its spot */
  23.     Handle    *w2chandle;    /* Handle for external worldtocam's */
  24.     Transform     worldtocam;    /* this puts the camera at the origin, etc*/
  25.     int     flag;        /* perspective?  stereo? */
  26.     float    halfyfield,    /* FOV half-width at z=1 (Y direction) */
  27.             frameaspect,    /* Aspect ratio, X/Y */
  28.             focus,        /* Nominal focal distance for perspec<->ortho*/
  29.             near, far,    /* Near & far clipping distances */
  30.             stereo_sep,
  31.         stereo_angle;
  32.     Handle    *sterhandle[2];
  33.     Transform    stereyes[2];    /* For stereo separation */
  34.     int        whicheye;    /* Current stereo eye selection */
  35.     int        changed;    /* Mask of "changed" fields, for CamMerge */
  36.     int        space;        /* TM_EUCLIDEAN, TM_HYPERBOLIC, or TM_SPHERICAL */
  37. };
  38.  
  39. /* bits for 'flag' and 'changed' fields */
  40. #define    CAMF_PERSP        0x01
  41. #define    CAMF_STEREO        0x02
  42. #define    CAMF_NEWC2W        0x04
  43.  
  44. /* bits for 'changed' only */
  45.  
  46. #define    CAMF_EYE        0x20
  47. #define    CAMF_STEREOXFORM    0x40
  48. #define    CAMF_STEREOGEOM        0x80
  49. #define    CAMF_W2C        0x100
  50. #define    CAMF_FOV        0x200
  51. #define    CAMF_ASPECT        0x400
  52. #define    CAMF_FOCUS        0x800
  53. #define    CAMF_NEAR        0x1000
  54. #define    CAMF_FAR        0x2000
  55. #define CAMF_SPACE        0x4000
  56.  
  57. /*
  58.  * routine for updating transforms
  59.  */
  60. void CamTransUpdate(Handle **, Camera *, Transform);
  61.  
  62. #endif /* !CAMERAP_H */
  63.